package com.tongji.housediy.view.components
{
	import flash.display.BitmapData;

	/**
	 * 
	 * @author chenchao
	 * 
	 */
	public class SpecificRoom extends AbstractDrawingRoom
	{
		public function SpecificRoom(typeIndex:int)
		{
			_vertices = new Vector.<Number>();
			
			_vertices.push(0, 0);
			switch (typeIndex)
			{
				case 0:
					_vertices.push(400, 0);
					_vertices.push(400, 400);
					_vertices.push(0, 400);
					borderLength = 4;
					break;
				case 1:
					_vertices.push(200, 0);
					_vertices.push(200, 200);
					_vertices.push(400, 200);
					_vertices.push(400, 400);
					_vertices.push(0, 400);
					borderLength = 6;
					break;
				case 2:
					_vertices.push(200, 0);
					_vertices.push(200, -200);
					_vertices.push(400, -200);
					_vertices.push(400, 200);
					_vertices.push(0, 200);
					borderLength = 6;
					break;
				case 3:
					_vertices.push(400, 0);
					_vertices.push(400, 400);
					_vertices.push(200, 400);
					_vertices.push(200, 200);
					_vertices.push(0, 200);
					borderLength = 6;
					break;
				case 4:
					_vertices.push(400, 0);
					_vertices.push(400, 200);
					_vertices.push(200, 200);
					_vertices.push(200, 400);
					_vertices.push(0, 400);
					borderLength = 6;
					break;
				case 5:
					_vertices.push(420, 0);
					_vertices.push(420, 140);
					_vertices.push(210, 140);
					_vertices.push(210, 280);
					_vertices.push(420, 280);
					_vertices.push(420, 420);
					_vertices.push(0, 420);
					borderLength = 8;
					break;
				case 6:
					_vertices.push(420, 0);
					_vertices.push(420, 420);
					_vertices.push(0, 420);
					_vertices.push(0, 280);
					_vertices.push(210, 280);
					_vertices.push(210, 140);
					_vertices.push(0, 140);
					borderLength = 8;
					break;
				case 7:
					_vertices.push(420, 0);
					_vertices.push(420, 420);
					_vertices.push(280, 420);
					_vertices.push(280, 210);
					_vertices.push(140, 210);
					_vertices.push(140, 420);
					_vertices.push(0, 420);
					borderLength = 8;
					break;
				case 8:
					_vertices.push(140, 0);
					_vertices.push(140, 210);
					_vertices.push(280, 210);
					_vertices.push(280, 0);
					_vertices.push(420, 0);
					_vertices.push(420, 420);
					_vertices.push(0, 420);
					borderLength = 8;
					break;
				case 9:
					_vertices.push(100, 0);
					_vertices.push(100, -100);
					_vertices.push(300, -100);
					_vertices.push(300, 0);
					_vertices.push(400, 0);
					_vertices.push(400, 300);
					_vertices.push(0, 300);
					borderLength = 8;
					break;
				case 10:
					_vertices.push(400, 0);
					_vertices.push(400, 300);
					_vertices.push(300, 300);
					_vertices.push(300, 400);
					_vertices.push(100, 400);
					_vertices.push(100, 300);
					_vertices.push(0, 300);
					borderLength = 8;
					break;
				case 11:
					_vertices.push(300, 0);
					_vertices.push(300, 100);
					_vertices.push(400, 100);
					_vertices.push(400, 300);
					_vertices.push(300, 300);
					_vertices.push(300, 400);
					_vertices.push(0, 400);
					borderLength = 8;
					break;
				case 12:
					_vertices.push(100, 0);
					_vertices.push(100, -100);
					_vertices.push(400, -100);
					_vertices.push(400, 300);
					_vertices.push(100, 300);
					_vertices.push(100, 200);
					_vertices.push(0, 200);
					borderLength = 8;
					break;
				case 13:
					_vertices.push(200, 0);
					_vertices.push(400, 200);
					_vertices.push(400, 400);
					_vertices.push(0, 400);
					borderLength = 5;
					break;
				case 14:
					_vertices.push(200, -200);
					_vertices.push(400, -200);
					_vertices.push(400, 200);
					_vertices.push(0, 200);
					borderLength = 5;
					break;
				case 15:
					_vertices.push(400, 0);
					_vertices.push(400, 400);
					_vertices.push(200, 400);
					_vertices.push(0, 200);
					borderLength = 5;
					break;
				case 16:
					_vertices.push(400, 0);
					_vertices.push(400, 200);
					_vertices.push(200, 400);
					_vertices.push(0, 400);
					borderLength = 5;
					break;
				case 17:
					_vertices.push(300, 0);
					_vertices.push(400, 200);
					_vertices.push(300, 400);
					_vertices.push(0, 400);
					borderLength = 5;
					break;
				case 18:
					_vertices.push(100, -200);
					_vertices.push(400, -200);
					_vertices.push(400, 200);
					_vertices.push(100, 200);
					borderLength = 5;
					break;
				case 19:
					_vertices.push(400, 0);
					_vertices.push(400, 300);
					_vertices.push(200, 400);
					_vertices.push(0, 300);
					borderLength = 5;
					break;
				case 20:
					_vertices.push(200, -100);
					_vertices.push(400, 0);
					_vertices.push(400, 300);
					_vertices.push(0, 300);
					borderLength = 5;
					break;
				case 21:
					curveVector.push(1);
					
					_vertices.push(100, 0);
					_vertices.push(150, -100);
					_vertices.push(200, 0);
					_vertices.push(300, 0);
					_vertices.push(300, 150);
					_vertices.push(0, 150);
					borderLength = 6;
					break;
				case 22:
					_vertices.push(300, 0);
					_vertices.push(300, 150);
					_vertices.push(0, 150);
					borderLength = 4;
					break;
			}
			_vertices.push(0, 0);
			
			super.drawing();
		}
	}
}